package com.zl.util
{
	import cn.skyclass.business.SessionManager;
	
	
	import mx.collections.ArrayCollection;
	import mx.core.SoundAsset;

	public class MyUtil
	{
		public function MyUtil()
		{
		}
		
		public static function date2String(date:Date):String{
			var y:String = String(date.fullYear);
			var M:String = date.month<9?'0'+String(date.month+1):String(date.month+1);
			var d:String = date.date<10?'0'+String(date.date):String(date.date);
			var h:String = date.hours<10?'0'+String(date.hours):String(date.hours);
			var m:String = date.minutes<10?'0'+String(date.minutes):String(date.minutes);
			var s:String = date.seconds<10?'0'+String(date.seconds):String(date.seconds);
			
			return y+M+d+h+m+s;
		}
		
		public static function date2StringWithoutHMS(date:Date, begin:Boolean):String{
			var y:String = String(date.fullYear);
			var M:String = date.month<9?'0'+String(date.month+1):String(date.month+1);
			var d:String = date.date<10?'0'+String(date.date):String(date.date);
			var h:String = begin ? '00' : '23';
			var m:String = begin ? '00' : '59';
			var s:String = begin ? '00' : '59';
			
			return y+M+d+h+m+s;
		}
		
	}
}